var t = require;
var i = module;
cc.Class({
    extends: cc.Component,
    properties: {wordRoot: cc.Node},
    start: function start() {
        this.allWWord = [];
        for (var t = 0; t < this.wordRoot._children.length; t++) {
            var i = this.wordRoot._children[t].getComponent("WWord");
            i.setRightCB(this.childWordRightCB.bind(this)), this.allWWord.push(i);
        }
    },
    childWordRightCB: function childWordRightCB(t, i, o) {
        this.singleWordRightCB && this.singleWordRightCB(t, i, o),
            this.isAllRight() && this.rightCB && this.rightCB(this);
    },
    isAllRight: function isAllRight() {
        for (var t = !0, i = 0; i < this.allWWord.length; i++) {
            if (!this.allWWord[i].isRight()) {
                t = !1;
                break;
            }
        }
        return t;
    },
    setRightCB: function setRightCB(t) {
        this.rightCB = t;
    },
    setSingleWordRightCB: function setSingleWordRightCB(t) {
        this.singleWordRightCB = t;
    }
});
